using System;
using System.Collections.Generic;
using System.Data;
using System.Text;

using Kenly.DBFramework;
using SchemaProvider;

namespace Sql2000SchemaProvider
{
    public class Sql2000SchemaLoader:SchemaLoaderBase
    {

        private IDatabase _database = null;


        protected override IDatabase Database
        {
            get
            {
                if (_database == null)
                {
                    _database = DatabaseFactory.CreateSqlServerDatabase();
                }
                return _database;
            }
            set
            {
                _database = value;
            }
        }


        public override void ShowAboutBox()
        {
            Sql2000AboutBox sql2000AboutBox = new Sql2000AboutBox();
            sql2000AboutBox.ShowDialog();
        }

        protected override string ListIdentitiesSql()
        {
            return Sql2000CommandUtility.ListIdentities();
        }

        protected override string ListPrimaryKeysSql()
        {
            return Sql2000CommandUtility.ListPrimaryKeys();
        }

        protected override string ListForeignKeySql()
        {
            return Sql2000CommandUtility.ListForeignKey();
        }

        protected override string ListProcedureParametersSql()
        {
            return Sql2000CommandUtility.ListProcedures();
        }

        protected override string ListTableNamesSql()
        {
            return Sql2000CommandUtility.ListTableNames();
        }

        protected override string ListViewNamesSql()
        {
            return Sql2000CommandUtility.ListViewNames();
        }

    }
}
